UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E/SxV2K/ZljsAiWn4MZ/XVaOAo0yoHWHZqwwKxc7J7U='
WHERE
key_id = 'cc86a22ca0d32b714125dbefcef9f256ba5794d2a0e7dc88f14a60770a07b3c8'
AND (
token = 'E/SxV2K/ZljsAiWn4MZ/XVaOAo0yoHWHZqwwKxc7J7U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)