UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4b28uVl/NmoBKforvwYSgGAbl6/SVTIKIaTCnxCDLes='
WHERE
key_id = 'a25719c612a076079fe939fb32909bc38266bf4ba73dd5d794d2c4425f470dbf'
AND (
token = '4b28uVl/NmoBKforvwYSgGAbl6/SVTIKIaTCnxCDLes='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)