UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fR3O8nodDNWtuITl5dYlS5ywyGoSh9pCwLVVHLu8IHo='
WHERE
key_id = '73e5a78d80071c5feef0c6da80588ba1b005e94da5d0d8e134f03a554f2692fc'
AND (
token = 'fR3O8nodDNWtuITl5dYlS5ywyGoSh9pCwLVVHLu8IHo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)