UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jFZ4fO7+mYluSNIrLNDH3F02to5gZROEXNgIHXjCr6E=' 
WHERE 
  key_id = '0bb48535222f801595b5c928e219006f3de6cedc4dd5c7a91f5dc009191fdfdf' 
  AND (
    token = 'jFZ4fO7+mYluSNIrLNDH3F02to5gZROEXNgIHXjCr6E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014