UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/mqBj4/gkd2ifSTi0a6GMo2PFJY6oQ0YJbz3eL8wcsA=' 
WHERE 
  key_id = '2770e8d14577a95142fde03bec4035da8d7e6ab26fb18ed60e99b7238dc3db2e' 
  AND (
    token = '/mqBj4/gkd2ifSTi0a6GMo2PFJY6oQ0YJbz3eL8wcsA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035