UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EgGambHhmcPy11IfwENBGXei+5uDFV64/f35kD9FI18='
WHERE
key_id = '13405d84bbe72dc0a364fc624540046419fc6a3cbbb407f431edcccc3d7e6003'
AND (
token = 'EgGambHhmcPy11IfwENBGXei+5uDFV64/f35kD9FI18='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)