UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JWEDEtUgVr2KYbyYz0nSAVy9BmTFSQMtwSVj2jlXGMo=' 
WHERE 
  key_id = '70af69bb726a7be46259cfbd4232984f40600a21fb59be1f2215430ffb8a1f2f' 
  AND (
    token = 'JWEDEtUgVr2KYbyYz0nSAVy9BmTFSQMtwSVj2jlXGMo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022