UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xfFmQYp9wdHTpFECB/V7ZfUvXKJDg6XKq4Bg11tM3tM='
WHERE
key_id = '3302349577f5bc9ede1d67dc8ecde7940dd6f1a2a7f028a1930907f885d44304'
AND (
token = 'xfFmQYp9wdHTpFECB/V7ZfUvXKJDg6XKq4Bg11tM3tM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)