UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1uT5NkvQFmLTvESIR+mh3s79aOmO9m4i1Ivx55bbVwQ='
WHERE
key_id = '5efed863b17b6e1b904e9daa5174079f570c54a78b37d0e8901279c7a949937d'
AND (
token = '1uT5NkvQFmLTvESIR+mh3s79aOmO9m4i1Ivx55bbVwQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)