UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/S+PcPZC95bg5thtJFwZ/wZSYRO3Gyoc96myn/PRhoI='
WHERE
key_id = '68e421ea1298273c6b29ad99334a8727705255a96404e2c172934eb7701fdd02'
AND (
token = '/S+PcPZC95bg5thtJFwZ/wZSYRO3Gyoc96myn/PRhoI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)