UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DggTPOOfiYViWyh3Zxje+QTUHUe2LCrXyYCEbwsgEFM='
WHERE
key_id = '1470ea991786b510075cb903b01b25209ac787d08dc79d11cc87e31c5c9dc764'
AND (
token = 'DggTPOOfiYViWyh3Zxje+QTUHUe2LCrXyYCEbwsgEFM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)