UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iM00ca4Tvmy8tRZYi9z2zZ+kTeT7zI81ruzFiJIEo8E=' 
WHERE 
  key_id = 'e1ef2279379831d72dd4c67e4448d0cf8006a08e63bdff94eae4ee1abda1d692' 
  AND (
    token = 'iM00ca4Tvmy8tRZYi9z2zZ+kTeT7zI81ruzFiJIEo8E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015