UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w3nkFE5d7NjFjb0rR7deYm8nBnEy3zY/VeIsfmEQXZ0='
WHERE
key_id = '15aba7f83f917992930ca2042d61a414912609a5be93dd1a91ed1ba1b5570374'
AND (
token = 'w3nkFE5d7NjFjb0rR7deYm8nBnEy3zY/VeIsfmEQXZ0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)