UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tla/Ta1ZSS3dl3bVhG6X2ve4zG8zSnwPYrQHZSkTUJg='
WHERE
key_id = 'aecb46369cd9d52c0d597acddb20e29087558bd413a9e845ed49c51fb1ffff8e'
AND (
token = 'tla/Ta1ZSS3dl3bVhG6X2ve4zG8zSnwPYrQHZSkTUJg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)