UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zItUkycB22S7Z1ndh8QGGoDQjm/plrRmLNV5HzbU1Zw='
WHERE
key_id = '193604903c7de4d90605448c9b6b982805d80f6b5ffc42e5d6fd37d185e79e4b'
AND (
token = 'zItUkycB22S7Z1ndh8QGGoDQjm/plrRmLNV5HzbU1Zw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)