UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U0RWxWbl+tjpkyuC9nU3re2pF7JENK/yIgzXtu4JNUE='
WHERE
key_id = '2af1d1ce08ff98a1662d8fef2511e726e3c7bce75c7738797fb064ee49eaaa1d'
AND (
token = 'U0RWxWbl+tjpkyuC9nU3re2pF7JENK/yIgzXtu4JNUE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)