UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2yr1E6qB/HjlPXdGHwNYOsnnm7yzs2KThRd8TMCgbSs=' 
WHERE 
  key_id = 'f9791d254a6bbf78ca4e36cd3af9c0be8c2aaaa509d528f08b0f961cb91e5b3a' 
  AND (
    token = '2yr1E6qB/HjlPXdGHwNYOsnnm7yzs2KThRd8TMCgbSs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029