UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FOgu1G/7f2WqkNKTvtjreNKV8Ng3vsEkEOeLkzlOJVA='
WHERE
key_id = '092b980320a937ace009fdec01a74035b3f73620beedf9364e8764d618af81cc'
AND (
token = 'FOgu1G/7f2WqkNKTvtjreNKV8Ng3vsEkEOeLkzlOJVA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)