UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iT9RjRCJcx1b0yXKvLCl/KPDSxdTvTz2bhQvVlprBEY='
WHERE
key_id = 'dba060f6acd2953a5f1963b96e9173c69a789bdf4f4a416c5fc28a625afadb74'
AND (
token = 'iT9RjRCJcx1b0yXKvLCl/KPDSxdTvTz2bhQvVlprBEY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)