UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WFr7ZdeivyBoToVrj5UVm3jC52xnA5zgV2cv34ThMtY='
WHERE
key_id = '93d47b4ab3f3d00e23c69edeba522627bcc85522540ad1020e5989d0ed5a82c3'
AND (
token = 'WFr7ZdeivyBoToVrj5UVm3jC52xnA5zgV2cv34ThMtY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)