UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '53p4LbiG5gW5S/CB5C1zWkmnWIndxA4IDLDSp4KKlb4='
WHERE
key_id = '7c03f4478a7a87b35fa6160be1e8c17836d14d28f60a003ad7f11e6b57b109bd'
AND (
token = '53p4LbiG5gW5S/CB5C1zWkmnWIndxA4IDLDSp4KKlb4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)