UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yckKO0lSzCuYPcIYXavckv7wYTvXjl/a7qNno0FCDBE='
WHERE
key_id = '1901d087caaa409408d7fe02fdeef2faab318a70efe1cb71541584045809d0f5'
AND (
token = 'yckKO0lSzCuYPcIYXavckv7wYTvXjl/a7qNno0FCDBE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)