UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aJ/L4nPorMN4W3kiJ+nPVV8GH9/Ph1zg3tjmuuXt5vU='
WHERE
key_id = 'cb48ac44deb441e278e140fe0a6cd17e35bbdb9d21ce894786faf0364c2d6265'
AND (
token = 'aJ/L4nPorMN4W3kiJ+nPVV8GH9/Ph1zg3tjmuuXt5vU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)