UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '08dXah7IOXMnwrpiwqI/mknstw+x5bSKyafMJWsAgIY='
WHERE
key_id = '911fae413bf30f461d0b546c145f638186359acbf3758d32057f0a54fe2fc785'
AND (
token = '08dXah7IOXMnwrpiwqI/mknstw+x5bSKyafMJWsAgIY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)