UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0SjBfo40k7qdnot3KXVRoU8km3sj/pokgpvQ+72jiC4=' 
WHERE 
  key_id = '68cb43355b2b7db58f2a91e92e321e3a302d63aaf893b7f2135101facdba182b' 
  AND (
    token = '0SjBfo40k7qdnot3KXVRoU8km3sj/pokgpvQ+72jiC4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026