UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9vKhrHkYkz/9fetQLadzbc0Szi+ZNVfDVTCCpt2giQQ=' 
WHERE 
  key_id = '5cc264a80b0ab8f0ab5cf0e0fe6c388ba5e86dc49d6247957da335590a155b84' 
  AND (
    token = '9vKhrHkYkz/9fetQLadzbc0Szi+ZNVfDVTCCpt2giQQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034