UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZxbdC5xv7zvNJ75jpHXzSxOHr1K/8ZX7yfGpPoe91is='
WHERE
key_id = '38bc0fb6290fca85a6a5e82b74818d2db30404e7c0296b2b949f2b95241b5b0b'
AND (
token = 'ZxbdC5xv7zvNJ75jpHXzSxOHr1K/8ZX7yfGpPoe91is='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)