UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9NCbK7B0VMDPBuSYgQWEOXfnLa26ZE++s61V2pO6QQI='
WHERE
key_id = '63f248303f655991e0742d99973f7eaf2805cb01dab16ec8c4e00ecf95461352'
AND (
token = '9NCbK7B0VMDPBuSYgQWEOXfnLa26ZE++s61V2pO6QQI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)