UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4u4fGz7JIG+8MFsPl6Thf7sYos6s1EYQYftN8NNxe64=' 
WHERE 
  key_id = '5e38e919acfd3b17a4b39f72b65683a5a65c2c9c15691124db5629b1215b9cc2' 
  AND (
    token = '4u4fGz7JIG+8MFsPl6Thf7sYos6s1EYQYftN8NNxe64=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022