UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ifqn+7EluWIANAaadD8zEruNIuBpqdSmqJdcJ72LhEI=' 
WHERE 
  key_id = '03b2644b7c47d0f6ff51cbbfc87655c65ddcb7b27ade5a2fcbf5c6f1895a9209' 
  AND (
    token = 'ifqn+7EluWIANAaadD8zEruNIuBpqdSmqJdcJ72LhEI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038