UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '142TLi1NnIl1b0rN1AUGh5+AIbpV6vpxVLyF4Plh9Oc=' 
WHERE 
  key_id = '592dba35feb9f22d31807dd72419ddce2759b03fd9ece7b6a9426ccf149c9b84' 
  AND (
    token = '142TLi1NnIl1b0rN1AUGh5+AIbpV6vpxVLyF4Plh9Oc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047