UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+sY0UQwfBz4QNRH0i0zb0ze7kxjklxGPgiUaKKFBKV4=' 
WHERE 
  key_id = '14c658bb6aac6577f3cbdc122a45c4345fc7599c7cbbc675896976abd135ee9a' 
  AND (
    token = '+sY0UQwfBz4QNRH0i0zb0ze7kxjklxGPgiUaKKFBKV4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019